import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import './assets/css/common.css'
import api from  './api/http'
import './router/premission'
import './directive/btnPermission'

Vue.config.productionTip = false
Vue.prototype.$api = api;

import VueRouter from "vue-router";

// vue-router3.0->3.2版本 router报错错误的捕获，或者回退版本 3.0.7
// const originalPush = VueRouter.prototype.push
// VueRouter.prototype.push = function push(location, onResolve, onReject) {
// 	if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
// 	return originalPush.call(this, location).catch(err => err)
// }


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
